﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ERP.Inventory.Infastructure.Migrations
{
    public partial class _1 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "checkandShopModels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    InvenId = table.Column<int>(type: "int", nullable: false),
                    ShopId = table.Column<int>(type: "int", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CreatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_checkandShopModels", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "checkModels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    InvenCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    InvenState = table.Column<int>(type: "int", nullable: false),
                    Mid = table.Column<int>(type: "int", nullable: false),
                    InvenType = table.Column<int>(type: "int", nullable: false),
                    StoreId = table.Column<int>(type: "int", nullable: false),
                    InvenRange = table.Column<int>(type: "int", nullable: false),
                    InvenStartTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    InvenEndTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Note = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AttnId = table.Column<int>(type: "int", nullable: false),
                    AttnName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateUserTime = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsHaveShop = table.Column<bool>(type: "bit", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CreatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_checkModels", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "InventoryModels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ShopCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Addr = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Number = table.Column<int>(type: "int", nullable: false),
                    State = table.Column<int>(type: "int", nullable: false),
                    LocationName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CurrentInventory = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    InventoryAmount = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    PendingStorage = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    PendingWarehouseDispatch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AvailableInventory = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    AvailableInventoryAmount = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CreatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_InventoryModels", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "putModels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    InventoryId = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    InStoreNo = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodsIds = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IntOutStoreTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    StoreId = table.Column<int>(type: "int", nullable: false),
                    Count = table.Column<int>(type: "int", nullable: false),
                    Reson = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    IsIntOrOut = table.Column<bool>(type: "bit", nullable: false),
                    AttnId = table.Column<int>(type: "int", nullable: false),
                    AttnName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateUserName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CreatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_putModels", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "shopModels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ShopName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ShopCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ShopGui = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ShopUnit = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SystemNum = table.Column<int>(type: "int", nullable: false),
                    ActualNum = table.Column<int>(type: "int", nullable: false),
                    DifferentCount = table.Column<int>(type: "int", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CreatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_shopModels", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "storeModels",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    StoreName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    CreatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdatePeople = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_storeModels", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "checkandShopModels");

            migrationBuilder.DropTable(
                name: "checkModels");

            migrationBuilder.DropTable(
                name: "InventoryModels");

            migrationBuilder.DropTable(
                name: "putModels");

            migrationBuilder.DropTable(
                name: "shopModels");

            migrationBuilder.DropTable(
                name: "storeModels");
        }
    }
}
